package cn.tedu.v1.controller;


import cn.tedu.v1.model.Store;
import cn.tedu.v1.service.IDrugService;
import cn.tedu.v1.service.IStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tedu.cn
 * @since 2021-07-07
 */
@RestController
@RequestMapping("/v1/store")
public class StoreController {
    @Autowired
    private IStoreService storeService;
    @Autowired
    private IDrugService drugService;
    @PostMapping("/store")
    public void store(Store store){//药物出入库业务
        storeService.store(store);//出入库记录
        drugService.store(store);//药品数量修改
    }
}
